﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace HQPad.Models
{
    public class Guild
    {
        public Guild()
        {
            PrimaryParents = new List<Guild>();
            AllowedGuilds = new List<Guild>();
        }

        public int GuildID { get; set; }

        [Display(Name = "Guild name")]
        [Required(ErrorMessage = "A guild name is required")]
        [MaxLength(30, ErrorMessage = "The guild name is limited to 30 characters")]
        public string Name { get; set; }

        public string Description { get; set; }

        [Display(Name = "Guild name")]
        [Required(ErrorMessage = "A primary class type is required")]
        [MaxLength(30, ErrorMessage = "The guild name is limited to 30 characters")]
        [RegularExpression("Warrior|Acolyte|Mage|Scout")]
        public string PrimaryClass { get; set; }

        public int RuleSetID { get; set; }

        public virtual ICollection<Invocation> Invocations { get; set; }

        public string Slug { get; set; }

        [MaxLength(20, ErrorMessage = "The sphere is limited to 20 characters")]
        [RegularExpression("Blue|Black|Brown|Green|Grey|Red|White|Yellow")]
        public string MagicColour { get; set; }

        [MaxLength(20, ErrorMessage = "The sphere is limited to 20 characters")]
        [RegularExpression("Good|Neutral|Evil")]
        public string Sphere { get; set; }

        public virtual ICollection<Guild> PrimaryParents { get; set; }
        public virtual ICollection<Guild> AllowedGuilds { get; set; }
    }
}